package com.bm.controller;

import com.bm.Result.Result;
import com.bm.query.Epidemic.EpidemicCreateQuery;
import com.bm.query.Epidemic.EpidemicDetailQuery;
import com.bm.query.Epidemic.EpidemicListQuery;
import com.bm.service.EjyyEpidemicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 2024年3月4日20:58:49
 */

@RestController
public class EpidemicController {
    @Autowired
    private EjyyEpidemicService ejyyEpidemicService;


    @PostMapping("/epidemic/list")
    public Result EpidemicList(@RequestBody EpidemicListQuery epidemicListQuery) {
        return ejyyEpidemicService.listEpidemic(epidemicListQuery);
    }

    @PostMapping("/epidemic/create")
    public Result EpidemicCreate(@RequestBody EpidemicCreateQuery epidemicCreateQuery){
        return ejyyEpidemicService.createEpidemicMsg(epidemicCreateQuery);
    }

    @PostMapping("/epidemic/detail")
    public Result epidemicDetail(@RequestBody EpidemicDetailQuery epidemicDetailQuery){
        return ejyyEpidemicService.detailEpidemic(epidemicDetailQuery);
    }

}
